package com.itwn.comic.service;


import com.itwn.comic.entity.Slideshow;
import com.itwn.comic.mapper.SlideshowMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SlideshowService {
    
    @Autowired
    SlideshowMapper slideshowMapper;
    public List<Slideshow> queryAll(){
        return this.slideshowMapper.selectAll();
    }
    
    public void addSlideshow(Slideshow slideshow){
        this.slideshowMapper.insert(slideshow);
    }
    
    public void modifySlideshow(Slideshow slideshow){
        this.slideshowMapper.updateByPrimaryKey(slideshow);
    }
    
    public void delSlideshow(int id){
        this.slideshowMapper.deleteByPrimaryKey(id);
    }
    
}
